//
//  DeviceViewModel.h
//  ForYourBeauty
//
//  Created by Kelly xu on 2019/6/3.
//  Copyright © 2019 changrenTech. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DeviceListModel.h"
#import "DeviceContinueModel.h"
NS_ASSUME_NONNULL_BEGIN

@interface DeviceViewModel : NSObject
@property(nonatomic,assign)NSInteger bindNumber;
/**
 获取设备列表

 @param userId 用户id
 @param cmp 成功回调
 */
-(void)fetchDeviceList:(NSString*)userId cmp:(void(^)(NSMutableArray *deviceList))cmp;

/**
 绑定设备

 @param deviceId 设备id
 @param cmp 成功回调
 */
-(void)bindDevice:(NSString*)deviceId cmp:(void(^)())cmp fail:(void(^)())fail;

/**
 解绑设备

 @param deviceId 设备id
 @param cmp 成功回调
 */
-(void)unbindDevice:(NSString*)deviceId cmp:(void(^)())cmp;

/**
 获取设备信息

 @param deviceId 设备id
 @param cmp 成功回调
 */
-(void)fetchDeviceInfo:(NSString*)deviceId cmp:(void(^)(NSDictionary *deviceInfo))cmp;

/**
 操控设备

 @param deviceId 设备id
 @param option 指令
 @param suc 成功
 @param fail 失败
 */
-(void)optionDevice:(NSString*)deviceId option:(NSString*)option runtime:(NSInteger)runtime suc:(void(^)())suc fail:(void(^)())fail;

/**
 获取设备最后一次使用时间
 */
-(void)getLastDeviceUseTime:(void(^)(NSInteger time))cmp;

/// 获取剩余设备运行时间
/// @param deviceId 设备id
/// @param cmp 成功回调
-(void)getDeviceRemainTime:(NSString*)deviceId cmp:(void(^)(DeviceContinueModel *model))cmp;
@end

NS_ASSUME_NONNULL_END
